home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
basic
/
qbwinfnt.zip
/
EX_LDFNT.BAS
< prev
next >
Wrap
BASIC Source File
|
1994-03-01
|
1KB
|
36 lines
REM: EX_LDFNT.BAS, Unregistered Version 1.0
REM: Example of loading a font from Windows' font (FNT) file.
DECLARE SUB FastString (Text$, FClr%, X%, Y%, FontArray%())
DECLARE SUB LoadFontFile (FlName$, FontArray%(), RetCode%, RetMsg$)
'...setup a VGA screen mode...
SCREEN 12
'...prompt for a file name and file number...
INPUT "Enter Windows' font file (FNT) name (try SAMPLE.FNT): ", FlName$
'...dim array for font data (use REDIM so its DYNAMIC)...
REDIM FontArray%(1)
PRINT : PRINT "Loading font from "; FlName$; "..."
'...load the specified font from the file...
CALL LoadFontFile(FlName$, FontArray%(), RetCode%, RetMsg$)
IF (RetCode% <> 0) THEN
PRINT
PRINT "***** ERROR: RetCode% = "; RetCode%
PRINT "***** "; RetMsg$
ELSE
'...display a sample of the font...
CALL FastString("Sample of Font ", 2, 20, 80, FontArray%())
END IF
END